﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Diagnostics;
using System.Configuration;

namespace LoomDataEmulator.Logger
{
    public class Logger
    {
        public static string SourceApp = ConfigurationManager.AppSettings["EventViewerName"].ToString();

        public static void Message(string message)
        {
            if (!EventLog.SourceExists(SourceApp))
                EventLog.CreateEventSource(SourceApp, SourceApp);

            EventLog.WriteEntry(SourceApp, message);
        }
    }
}
